package test;

//import com.rabbitmq.client.Channel;
//import com.rabbitmq.client.Connection;
//import com.rabbitmq.client.ConnectionFactory;

import java.util.ArrayList;
import java.util.List;

public class Producer {

//    private static final String QUEUE_NAME = "simple_queue";
//
//
//    public static void main(String[] args) throws Exception {
//        // 创建连接工厂
//        ConnectionFactory factory = new ConnectionFactory();
//        factory.setHost("localhost"); // RabbitMQ 服务器的主机名
//
//        try (Connection connection = factory.newConnection();
//             Channel channel = connection.createChannel()) {
//            // 声明队列
//            channel.queueDeclare(QUEUE_NAME, false, false, false, null);
//
//            String message = "Hello, RabbitMQ!";
//
//            // 发布消息到队列
//            channel.basicPublish("", QUEUE_NAME, null, message.getBytes());
//            connection.close();
//            System.out.println("Sent message: " + message);
//        }
//    }
}
